#!/usr/bin/python

def main():
    D_INPUT = False

    if D_INPUT :
        N = input()
        req = input()
    else:
        N = 50
        req = (1, 2, 3,4,5,6,7,8,9,10)

    if N in req:
        print("YES")
        return

    sum = 0
    for i1 in xrange(len(req)):
        sum += req[i1]
        req1 = req[:i1]+req[i1+1:]

        for i2 in xrange(len(req1)):
            sum += req1[i2]
            req2 = req1[:i2]+req1[i2+1:]

            for i3 in xrange(len(req2)):
                sum += req2[i3]
                req3 = req2[:i3]+req2[i3+1:]

                for i4 in xrange(len(req3)):
                    sum += req3[i4]
                    req4 = req3[:i4]+req3[i4+1:]

                    for i5 in xrange(len(req4)):
                        sum += req4[i5]
                        req5 = req4[:i5]+req4[i5+1:]

                        for i6 in xrange(len(req5)):
                            sum += req5[i6]
                            req6 = req5[:i6]+req5[i6+1:]

                            for i7 in xrange(len(req6)):
                                sum += req6[i7]
                                req7 = req6[:i7]+req6[i7+1:]

                                for i8 in xrange(len(req7)):
                                    sum += req7[i8]
                                    req8 = req7[:i8]+req7[i8+1:]

                                    for i9 in xrange(len(req8)):
                                        sum += req8[i9]
                                        req9 = req8[:i9]+req8[i9+1:]

                                        for i10 in xrange(len(req9)):
                                            sum += req9[i10]

                                            if sum == N :
                                                print("YES")
                                                return

                                            sum = 0

    print("NO")

main()
    

